package com.qiantu.phone.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

public class AddDeviceMethodBean implements Parcelable{

    private String id;
    private String serialNo;
    private String number;
    private String name;
    private int productLinkType;
    private String logo;
    private boolean isDelete;
    private ArrayList<LinkStepsBean> linkSteps;

    protected AddDeviceMethodBean(Parcel in) {
        id = in.readString();
        serialNo = in.readString();
        number = in.readString();
        name = in.readString();
        productLinkType = in.readInt();
        logo = in.readString();
        isDelete = in.readByte() != 0;
        linkSteps = in.createTypedArrayList(LinkStepsBean.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(serialNo);
        dest.writeString(number);
        dest.writeString(name);
        dest.writeInt(productLinkType);
        dest.writeString(logo);
        dest.writeByte((byte) (isDelete ? 1 : 0));
        dest.writeTypedList(linkSteps);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<AddDeviceMethodBean> CREATOR = new Creator<AddDeviceMethodBean>() {
        @Override
        public AddDeviceMethodBean createFromParcel(Parcel in) {
            return new AddDeviceMethodBean(in);
        }

        @Override
        public AddDeviceMethodBean[] newArray(int size) {
            return new AddDeviceMethodBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getProductLinkType() {
        return productLinkType;
    }

    public void setProductLinkType(int productLinkType) {
        this.productLinkType = productLinkType;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public boolean isIsDelete() {
        return isDelete;
    }

    public void setIsDelete(boolean isDelete) {
        this.isDelete = isDelete;
    }

    public ArrayList<LinkStepsBean> getLinkSteps() {
        return linkSteps;
    }

    public void setLinkSteps(ArrayList<LinkStepsBean> linkSteps) {
        this.linkSteps = linkSteps;
    }

    public static class LinkStepsBean implements Parcelable {
        private String number;
        private int sort;
        private String name;
        private String title;
        private String introduce;
        private String logo;
        private boolean isDelete;

        protected LinkStepsBean(Parcel in) {
            number = in.readString();
            sort = in.readInt();
            name = in.readString();
            title = in.readString();
            introduce = in.readString();
            logo = in.readString();
            isDelete = in.readByte() != 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(number);
            dest.writeInt(sort);
            dest.writeString(name);
            dest.writeString(title);
            dest.writeString(introduce);
            dest.writeString(logo);
            dest.writeByte((byte) (isDelete ? 1 : 0));
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<LinkStepsBean> CREATOR = new Creator<LinkStepsBean>() {
            @Override
            public LinkStepsBean createFromParcel(Parcel in) {
                return new LinkStepsBean(in);
            }

            @Override
            public LinkStepsBean[] newArray(int size) {
                return new LinkStepsBean[size];
            }
        };

        public String getNumber() {
            return number;
        }

        public void setNumber(String number) {
            this.number = number;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getIntroduce() {
            return introduce;
        }

        public void setIntroduce(String introduce) {
            this.introduce = introduce;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public boolean isIsDelete() {
            return isDelete;
        }

        public void setIsDelete(boolean isDelete) {
            this.isDelete = isDelete;
        }
    }
}
